package ru.spbau.goncharova.chat.client.serverMessages;

import ru.spbau.goncharova.chat.client.Client;
import ru.spbau.goncharova.chat.protocol.ProtocolHeader;

import java.nio.ByteBuffer;

public class FetchReplyMessage extends ServerMessage {

    public final int state;

    public final String messageText;

    public FetchReplyMessage(ProtocolHeader header, ByteBuffer messageBuffer) {
        super(header, messageBuffer);
        state = messageBuffer.getInt();
        messageText = new String(messageBuffer.array(), Client.CLIENT_CHARSET);
    }
}
